package com.ailight.smart.ai.enums;

import com.ailight.smart.ai.domain.dto.deepseek.DpAnswerDTO;
import lombok.Getter;

/**
 * @author: 朱海鹏
 * @Package: com.ailight.smart.ai.enums
 * @Project: ai-light
 * @date: 2025/3/19 10:19
 * @description : 大模型相关枚举
 */
@Getter
public enum AiModelEnum {

    /**
     * deep-seek 推理模型
     */
    DEEP_SEEK_REASONER(1, "deepseek-reasoner",
            "deepSeekReasonerStrategy",
            "https://api.deepseek.com/chat/completions", DpAnswerDTO.class, true),

    /**
     * deep-seek-chat模型
     */
    DEEP_SEEK_CHAT(2, "deepseek-chat", "deepSeekChatStrategy",
            "https://api.deepseek.com/chat/completions", DpAnswerDTO.class, false),
    ;
    /**
     * 模型的code 值
     */
    private final Integer code;

    /**
     * 模型名称
     */
    private final String modelName;

    /**
     * 模型策略
     */
    private final String modelStrategy;

    /**
     * 调研模型路径
     */
    private final String url;

    /**
     * 这个是模型反回参数结果
     */
    private final Class<?> r;

    /**
     * 是否启用该模型
     */
    private final boolean enable;

    AiModelEnum(Integer code, String modelName, String modelStrategy, String url, Class<?> r, boolean enable) {
        this.code = code;
        this.modelName = modelName;
        this.modelStrategy = modelStrategy;
        this.url = url;
        this.r = r;
        this.enable = enable;
    }

    public static AiModelEnum getModelEnum(Integer code) {
        for (AiModelEnum modelEnum : AiModelEnum.values()) {
            if (modelEnum.getCode().equals(code)) {
                return modelEnum;
            }
        }
        return DEEP_SEEK_REASONER;
    }
}
